<?php 
echo $this->Html->script('custom.products');
?>

<div class="content">
<!-- InstanceBeginEditable name="Main Content" -->
	<h1 class="title" id='title_of_content'><a href="#"><?php __("Tổng quan sản phẩm");?></a> &raquo; <?php echo $category_product['ProductCategory']['name'];?></h1>
	<div class="products">
		<?php echo $form->create('Product', array('url' => array(
    		'plugin'		=> 'products',
    		'controller'	=> 'products',
    		'action'		=> 'submit'
    	))); ?>
			<fieldset class="category">
				<?php echo $form->input('categories', array('label' => __('Chọn danh mục', true), 'options'   => $categories, 'onChange' => 'this.form.submit()', 'selected' => $category_product['ProductCategory']['alias'])); ?>
			</fieldset>
        <?php echo $form->end(); ?>
		<div class="product-thumbnail">
			<span class="next"><?php __("Next");?></span>
			<span class="prev"><?php __("Prev");?></span>
			<div class="jcarousel">
				<ul>
				<?php foreach($products as $product):?>
					<li><a href="#productItem<?php echo $product['Product']['id'];?>"><img src="<?php echo $html->url('/').'files/products/'.$html->getThumbnailName($product['Product']['image']);?>" alt="Image" /></a></li>
				<?php endforeach;?>
				</ul>
			</div>
		</div>
		<div class="product-list">
		<?php foreach($products as $product):?>
			<div class="product-item" id="productItem<?php echo $product['Product']['id'];?>">
				<div class="product-image"><img src="<?php echo $html->url('/').'files/products/'.$product['Product']['image'];?>" alt="Image" /></div>
				<div class="product-content">
					<?php echo $product['Product']['content'];?>
				</div>
			</div>
		<?php endforeach;?>
		</div>
		<div class="back"><a href="#"><?php __("Quay lại trang đầu");?></a></div>
	</div>
<!-- InstanceEndEditable -->
</div>